package com.artron.mediaartron.base;

import android.support.annotation.LayoutRes;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;

import com.artron.baselib.utils.UIUtils;

import butterknife.ButterKnife;


/**
 * Class description here
 *
 * @author doing
 * @version 1.0.0
 * @since 2017-11-21.
 */

public abstract class BaseLinkPage {

    protected final View mContentView;
    protected final ViewGroup mContainer;

    public BaseLinkPage(ViewGroup parent, @LayoutRes int layoutId) {
        this.mContainer = parent;
        mContentView = UIUtils.inflate(layoutId, parent);
        ButterKnife.bind(this, mContentView);
        initVariable();
        initView();

    }

    protected void initVariable() {

    }

    protected abstract void initView();

    public View getContentView() {
        mContentView.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
                return true;
            }
        });
        return mContentView;
    }


}
